<template>
  <div class="bddy">
    <div class="head">
      <span>备单打印</span>
      <el-radio-group v-model="radio" @change="handleChange">
        <el-radio :label="1">未打印</el-radio>
        <el-radio :label="2">已打印</el-radio>
        <el-radio :label="3">全部</el-radio>
      </el-radio-group>
      <button class="print">打印</button>
      <button>退出</button>
    </div>
  </div>
</template>

<script>
export default {
  name: '',
  data() {
    return {
      radio: 3,
    }
  },
  methods: {
    handleChange() {},
    print() {
      let div = document.createElement('div')
      let att = document.createAttribute('class')
      att.value = 'xxx'
      div.innerHTML('1111111111111')
      document.body.appendChild(div)
    },
  },
  beforeCreate() {
    if (sessionStorage.getItem("token") == null) {
      this.$router.push("/login");
    } else {
      let token = sessionStorage.getItem("token");
      let length = sessionStorage.getItem("token").length;
      if (token[length - 1] == "0") {
        this.$router.replace("/login");
      }
    }
  },
  components: {}
}
</script>

<style scoped>
.head {
  height: 80px;
  border-bottom: 1px solid black;
}
.head span {
  font-size: 20px;
  line-height: 80px;
  margin-left: 25px;
}
.head .el-radio-group {
  margin-left: 50px;
}
.head button:nth-of-type(1) {
  margin-left: 840px;
}
.head button:nth-of-type(2) {
  margin-left: 100px;
}
button {
  width: 100px;
  height: 50px;
  border: none;
  outline: none;
  cursor: pointer;
  color: #fff;
  background-color: rgb(192, 51, 56);
}
button:active {
  opacity: 0.8;
}
.bddy ::v-deep .el-table .cell {
  text-align: center;
}
</style>